﻿
namespace MyFurion.Model
{
    /// <summary>
    /// 菜单信息
    /// </summary>
    [SugarTable("Sys_Menu")]
    [Tenant(0)]
    public class MenuInfo:BaseEntity
    {
        /// <summary>
        /// 父级Id
        /// </summary>
        [SugarColumn(IsNullable =true,ColumnDescription ="父级Id")]
        public long? ParentId { get; set; }
        /// <summary>
        /// 菜单编码
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "菜单编码")]
        public string MenuCode { get; set; }
        /// <summary>
        /// 菜单名称
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "菜单名称")]
        public string MenuName { get; set; }
        /// <summary>
        /// 菜单类别
        /// </summary>
        [SugarColumn(ColumnDescription = "菜单类别：1目录 2菜单 3按钮",DefaultValue ="1")]
        public EnumMenuType MenuType { get; set; }
        /// <summary>
        /// 菜单路由地址
        /// </summary>
        [SugarColumn(ColumnDescription = "菜单路由地址")]
        public string MenuUrl { get; set; }
        /// <summary>
        /// 菜单图标
        /// </summary>
        [SugarColumn(ColumnDescription = "菜单图标")]
        public string MenuIcon { get; set; }
        /// <summary>
        /// 停用启用状态
        /// </summary>
        [SugarColumn(ColumnDescription = "停用启用状态：0停用 1启用", DefaultValue ="1")]
        public EnumStatus Status { get; set; }
        /// <summary>
        /// 子菜单
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<MenuInfo> Children { get; set; } = new();
        /// <summary>
        ///角色是否有该菜单权限
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public bool IsRolePer { get; set; } = false;
    }
}
